<template>
    <view id="main">
        <scroll-view class="content" scroll-y>
            <view>
                <view v-for="item in putStore.tableDataList" class="item card">
                    <view class="title fs_17 color_black">
                        {{ item.name }}
                    </view>
                    <view class="body">
                        <view class="body_item flex">
                            <view class="label">数字识别码</view>
                            <view class="value">{{ item.id }}</view>
                        </view>
                        <view class="body_item flex">
                            <view class="label">废物类别</view>
                            <view class="value">{{ item.status }}</view>
                        </view>
                        <view class="body_item flex">
                            <view class="label">废物代码</view>
                            <view class="value">{{ item.code }}</view>
                        </view>
                        <view class="body_item flex">
                            <view class="label">重量(kg)</view>
                            <view class="value">{{ 20 }}</view>
                        </view>
                        <view class="body_item flex">
                            <view class="label">产生时间</view>
                            <view class="value">{{ item.putTime }}</view>
                        </view>
                    </view>
                    <view class="footer">
                        <ZyBtn backgroundColor="#fcedf1" color="#E14146">
                            删除
                        </ZyBtn>
                    </view>
                </view>
            </view>
        </scroll-view>
        <view id="footer">
            <button @tap="gosaveput" class="but">
                下一步
                <uni-icons color="#fff" type="arrow-right" size="16px" />
            </button>
        </view>
    </view>
</template>

<script lang="ts" setup>
import ZyBtn from "@/components/zy-btn/zy-btn.vue";
import { usePutStore } from "@/stores/modules/put/put";
const putStore = usePutStore();

const gosaveput = () => {
    uni.navigateTo({
        url: '/pages/index/put/saveput/saveput'
    });
}

</script>

<style lang="scss" scoped>
.top_right {
    display: flex;
    align-items: center;
    justify-content: space-between;

    .item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 4px;

        image {
            width: 24px;
            height: 24px;
        }
    }


}

scroll-view {
    height: calc(100vh - 120px);
    padding-bottom: 10px;

    .item {
        width: 92%;
        margin: 20px auto;

        .title {
            word-break: break-all;
        }

        .body {
            margin: 10px 0;

            .body_item {
                font-size: 14px;
                margin-bottom: 10px;
                align-items: flex-start;

                .label {
                    margin-right: 10px;
                    color: #7C8190;
                    white-space: nowrap;
                    width: 20%;
                }

                .value {
                    width: 80%;
                    color: #1D2541;
                    word-break: break-all;
                }

            }
        }

        .footer {
            display: flex;
            align-items: center;
            justify-content: flex-end;

            .zk_btn {
                margin: 0 10px;
                font-size: 14px;
                height: 30px !important;
                line-height: 30px !important;
            }
        }
    }
}

#footer {
    width: 100vw;
    height: 98px;
    border-radius: 12px 12px 0px 0px;
    box-shadow: 0px -2px 10px 0px rgba(9, 14, 29, 0.1);
    /* #FFFFFF 白色 100 */
    background: rgb(255, 255, 255);
    position: absolute;
    bottom: 0rpx;
    display: flex;
    align-items: center;
    justify-content: space-between;
    left: 0;
    padding: 20px;

    .all {
        margin-right: 10px;
    }

    .but {
        width: 80%;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 12px;
        background-color: #0077FF;
        color: #ffffff;
        font-size: 16px;
    }

    .but::after {
        border: none;
    }
}
</style>
